<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!-- 菜单定位 -->
<script type="text/javascript" >
 $(function(){
	 $("#sidebar li[mcode!='${menucode_key}']").removeClass("active open");
	 $("#sidebar li[mcode='${menucode_key}']").addClass("active open").parents().addClass("active open");
 })
</script>
<a class="mdenu-toggler" id="menu-toggler" href="#">
	<span class="menu-text"></span>
</a>
<div class="sidebar" id="sidebar">
	<ul class="nav nav-list">
	<c:forEach var="menu" items="${menus}" varStatus="idx">
		<li>
			<c:if test="${menu.hidden eq '0'}">
			<a
				<c:if test="${fn:length(menu.childResource) <= 0}">
				href="${ctx}/uums/working_on_it.do" 
				</c:if>
				<c:if test="${fn:length(menu.childResource) == 1}">
				href="${ctx}/${menu.childResource[0].url}" 
				</c:if>
				<c:if test="${fn:length(menu.childResource) > 1}">
				href="#" class="dropdown-toggle"
				</c:if>
				id="${menu.id}">
				<c:if test="${empty menu.img}">
				<i class="icon-list"></i>
				</c:if>
				<c:if test="${!empty menu.img}">
				<i class="${menu.img}"></i>
				</c:if>
				<span class="menu-text">${menu.shortName}</span>
				<c:if test="${fn:length(menu.childResource) > 0 && empty menu.actionId}">
				<b class="arrow icon-angle-down"></b>
				</c:if>
			</a>
			
			<c:if test="${fn:length(menu.childResource) > 1}">
			<ul class="submenu">
				<c:forEach var="leafMenu" items="${menu.childResource}" varStatus="ldx">
				<c:if test="${leafMenu.hidden == '0'}">
				<li mcode="${leafMenu.id}">
					<a href="${ctx}/${leafMenu.childResource[0].url}">
						<c:if test="${empty leafMenu.img}">
						<i class="icon-double-angle-right"></i>
						</c:if>
						<c:if test="${!empty leafMenu.img}">
						<i class="${leafMenu.img}"></i>
						</c:if>
						<span class="menu-text"> ${leafMenu.shortName}</span>
					</a>
				</li>
				</c:if>
				</c:forEach>
			</ul>
			</c:if>
		</c:if>
		</li>
		</c:forEach>
	</ul>
	<div class="sidebar-collapse" id="sidebar-collapse">
		<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
	</div>
</div>
